package com.neu.yishu.service.serviceImpl;

import com.neu.yishu.mapper.BookInfoMapper;
import com.neu.yishu.model.BookInfo;
import com.neu.yishu.service.BookInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookInfoServiceImpl implements BookInfoService {
    @Autowired
    BookInfoMapper bookInfoMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return bookInfoMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(BookInfo record) {
        return bookInfoMapper.insert(record);
    }

    @Override
    public BookInfo selectByPrimaryKey(Long id) {
        return bookInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<BookInfo> selectAll() {
        return bookInfoMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(BookInfo record) {
        return bookInfoMapper.updateByPrimaryKey(record);
    }
}
